package com.iss.demo.dao;

import com.iss.demo.entity.Contact;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface ContactDao {
    @Select("select * from Contact")
    List<Contact> selectAll();

    @Insert("insert into contact (c_user,c_time,c_contact) values(#{c_user},CURRENT_TIMESTAMP,#{c_contact})")
    public Integer insertContact(Contact contact);
}
